package day10_io_code.com.itheima.d3_transfer_stream;

import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

public class Demo3_OutputStreamWriter {
    public static void main(String[] args) {
        try(
                FileOutputStream fos = new FileOutputStream("d:/b.txt");
                OutputStreamWriter osw = new OutputStreamWriter(fos);
                BufferedWriter bw = new BufferedWriter(osw);
                ){
            bw.write("hello,world");
            bw.newLine();
            bw.write("java");
            bw.newLine();
            bw.write("java");
        }catch (Exception e){
            e.printStackTrace();
        }


    }
}
